3.103 \(\int \frac {\sec ^2(c+d x)}{a+i a \tan (c+d x)} \, dx\)

Optimal. Leaf size=23 \[ \frac {x}{a}+\frac {i \log (\cos (c+d x))}{a d} \]

[Out]

x/a+I*ln(cos(d*x+c))/a/d

________________________________________________________________________________________

Rubi [A]  time = 0.04, antiderivative size = 23, normalized size of antiderivative = 1.00, number of steps used = 2, number of rules used = 2, integrand size = 24, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.083, Rules used = {3487, 31} \[ \frac {x}{a}+\frac {i \log (\cos (c+d x))}{a d} \]

Antiderivative was successfully verified.

[In]

Int[Sec[c + d*x]^2/(a + I*a*Tan[c + d*x]),x]

[Out]

x/a + (I*Log[Cos[c + d*x]])/(a*d)

Rule 31

Int[((a_) + (b_.)*(x_))^(-1), x_Symbol] :> Simp[Log[RemoveContent[a + b*x, x]]/b, x] /; FreeQ[{a, b}, x]

Rule 3487

Int[sec[(e_.) + (f_.)*(x_)]^(m_)*((a_) + (b_.)*tan[(e_.) + (f_.)*(x_)])^(n_), x_Symbol] :> Dist[1/(a^(m - 2)*b
*f), Subst[Int[(a - x)^(m/2 - 1)*(a + x)^(n + m/2 - 1), x], x, b*Tan[e + f*x]], x] /; FreeQ[{a, b, e, f, n}, x
] && EqQ[a^2 + b^2, 0] && IntegerQ[m/2]

Rubi steps

\begin {align*} \int \frac {\sec ^2(c+d x)}{a+i a \tan (c+d x)} \, dx &=-\frac {i \operatorname {Subst}\left (\int \frac {1}{a+x} \, dx,x,i a \tan (c+d x)\right )}{a d}\\ &=\frac {x}{a}+\frac {i \log (\cos (c+d x))}{a d}\\ \end {align*}

________________________________________________________________________________________

Mathematica [A]  time = 0.12, size = 31, normalized size = 1.35 \[ \frac {2 \tan ^{-1}(\tan (d x))+i \log \left (\cos ^2(c+d x)\right )}{2 a d} \]

Antiderivative was successfully verified.

[In]

Integrate[Sec[c + d*x]^2/(a + I*a*Tan[c + d*x]),x]

[Out]

(2*ArcTan[Tan[d*x]] + I*Log[Cos[c + d*x]^2])/(2*a*d)

________________________________________________________________________________________

fricas [A]  time = 0.44, size = 26, normalized size = 1.13 \[ \frac {2 \, d x + i \, \log \left (e^{\left (2 i \, d x + 2 i \, c\right )} + 1\right )}{a d} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(sec(d*x+c)^2/(a+I*a*tan(d*x+c)),x, algorithm="fricas")

[Out]

(2*d*x + I*log(e^(2*I*d*x + 2*I*c) + 1))/(a*d)

________________________________________________________________________________________

giac [B]  time = 2.27, size = 57, normalized size = 2.48 \[ -\frac {-\frac {i \, \log \left (\tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) + 1\right )}{a} + \frac {2 i \, \log \left (\tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) - i\right )}{a} - \frac {i \, \log \left (\tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) - 1\right )}{a}}{d} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(sec(d*x+c)^2/(a+I*a*tan(d*x+c)),x, algorithm="giac")

[Out]

-(-I*log(tan(1/2*d*x + 1/2*c) + 1)/a + 2*I*log(tan(1/2*d*x + 1/2*c) - I)/a - I*log(tan(1/2*d*x + 1/2*c) - 1)/a
)/d

________________________________________________________________________________________

maple [A]  time = 0.26, size = 23, normalized size = 1.00 \[ -\frac {i \ln \left (a +i a \tan \left (d x +c \right )\right )}{a d} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(sec(d*x+c)^2/(a+I*a*tan(d*x+c)),x)

[Out]

-I/a/d*ln(a+I*a*tan(d*x+c))

________________________________________________________________________________________

maxima [A]  time = 0.33, size = 20, normalized size = 0.87 \[ -\frac {i \, \log \left (i \, a \tan \left (d x + c\right ) + a\right )}{a d} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(sec(d*x+c)^2/(a+I*a*tan(d*x+c)),x, algorithm="maxima")

[Out]

-I*log(I*a*tan(d*x + c) + a)/(a*d)

________________________________________________________________________________________

mupad [B]  time = 3.35, size = 19, normalized size = 0.83 \[ -\frac {\ln \left (\mathrm {tan}\left (c+d\,x\right )-\mathrm {i}\right )\,1{}\mathrm {i}}{a\,d} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(1/(cos(c + d*x)^2*(a + a*tan(c + d*x)*1i)),x)

[Out]

-(log(tan(c + d*x) - 1i)*1i)/(a*d)

________________________________________________________________________________________

sympy [F]  time = 0.00, size = 0, normalized size = 0.00 \[ - \frac {i \int \frac {\sec ^{2}{\left (c + d x \right )}}{\tan {\left (c + d x \right )} - i}\, dx}{a} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(sec(d*x+c)**2/(a+I*a*tan(d*x+c)),x)

[Out]

-I*Integral(sec(c + d*x)**2/(tan(c + d*x) - I), x)/a

________________________________________________________________________________________